package com.example.commons.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @program: authority-v3.0.7
 * @ClassName:Collect
 * @description: 首页 实体类
 * @author:dyy
 * @Version 3.0
 **/

@Data
@Builder(toBuilder = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_home")
@Schema(title = "Home对象", description = "首页")
public class Home implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(title = "序列号")
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelProperty("序列号")
    private Long id;

    @Schema(title = "首页标题")
    @TableField("title")
    @ExcelProperty("首页标题")
    private String title;

    @Schema(title = "首页详情")
    @TableField("content")
    @ExcelProperty("首页详情")
    private String content;

    @Schema(title = "展示状态（1：展示；2：不展示）")
    @TableField("state")
    @ExcelProperty("展示状态（1：展示；2：不展示）")
    private Long state;

    @Schema(title = "创建账户")
    @TableField("uid")
    @ExcelProperty("创建账户")
    private Long uid;

    @Schema(title = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(title = "修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty("修改时间")
    private LocalDateTime updateTime;
}
